<template>
  <div class="it" @click="tab(setopt.txt)">
      <div class="img">
         <img class="imgs" :src="setopt.txt==who?setopt.iconde:setopt.iconac" alt="">
      </div>
      <div class="txt">
         {{setopt.txt}}
      </div>
  </div>
</template>

<script>

export default {
   props:["setopt","who"],
   methods:{
     tab(v){
       console.log(v)
       // 给父组件传值告诉父组件我被点了
       this.$emit("dian",v)
     }
   }
}
</script>

<style>
.it{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.img{
    height: 25px;
    width: 25px;
}
  .img .imgs{
    width: 100%;
  }
</style>